import { keyboard, Key, mouse, Button, Point, linear, clipboard } from '@nut-tree/nut-js';

export default async function selectMessage() {
    const currentPosition = await mouse.getPosition();

    await mouse.pressButton(Button.LEFT);
    await mouse.move(new Point(currentPosition.x, currentPosition.y + 600), linear(500));
    await mouse.releaseButton(Button.LEFT);

    await keyboard.pressKey(Key.LeftControl, Key.C);
    await keyboard.releaseKey(Key.LeftControl, Key.C);

    console.log('消息已复制到剪贴板');
    const copiedText = await clipboard.getContent();
    console.log('复制的内容：', copiedText);

}
